package com.mioto.ld.module.organization.service.impl;

import com.mioto.ld.module.organization.model.OrgPagerVO;
import com.mioto.ld.module.organization.model.OrgTypeStatisticsVO;
import org.springframework.stereotype.Service;

import com.mioto.ld.module.organization.dao.OrganizationDao;
import com.mioto.ld.module.organization.model.Organization;
import com.mioto.ld.module.organization.service.IOrganizationService;
import javax.annotation.Resource;
import java.util.List;

/**
 *
 * @author mioto
 * @date 2024-05-14 19:42:32
 */
@Service("organizationService")
public class OrganizationServiceImpl implements IOrganizationService{

    @Resource
    private OrganizationDao organizationDao;

    @Override
    public List<Organization> findList(Organization organization) {
        return organizationDao.findList(organization);
    }

    @Override
    public List<OrgPagerVO> findPager(Organization organization) {
        return organizationDao.findPager(organization);
    }

    @Override
    public int insert(Organization organization) {
        organization.initCreateData();
        return organizationDao.insertIgnoreNull(organization);
    }

    @Override
    public int update(Organization organization) {
        return organizationDao.update(organization);
    }

    @Override
    public int updateIgnoreNull(Organization organization) {
        return organizationDao.updateIgnoreNull(organization);
    }

    @Override
    public Organization findByColumn(String column, Object value) {
        return organizationDao.findByColumn(column,value);
    }

    @Override
    public int deleteByColumn(String column, Object value) {
        return organizationDao.deleteByColumn(column,value);
    }

    @Override
    public int batchDelete(Integer[] ids) {
        return organizationDao.batchDelete(ids);
    }

    @Override
    public List<OrgTypeStatisticsVO> typeStatistics() {
        return organizationDao.typeStatistics();
    }
}